package com.lamp.controller;

import com.lamp.service.IUserService;
import com.lamp.vo.User;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2016/6/20.
 */
@Controller
@RequestMapping(value = "users")
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping(method = RequestMethod.GET)
    @ResponseBody
    public String getUser(){
        User user = userService.selectUserById(1);
        return ""+user.getUserId()+user.getUserName()+user.getUserPassword();
    }

}
